home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10937 < prev    next >
Encoding:
Text File  |  1996-08-05  |  574 b   |  25 lines

  1. Newsgroups: comp.lang.c
  2. Path: news1.io.org!torfree!bz786
  3. From: bz786@torfree.net (Sherif Asif)
  4. Subject: Beginer C please help me
  5. Message-ID: <DoLCFx.B7x.0.bloor@torfree.net>
  6. Organization: Toronto Free-Net
  7. X-Newsreader: TIN [version 1.2 PL2]
  8. Date: Thu, 21 Mar 1996 00:09:33 GMT
  9.  
  10. This may be a stupid mistake but "please help" me.
  11. Thank you very much.
  12.  
  13. #include <stdio.h>
  14. #include <math.h>
  15. main ()
  16. {
  17. float n;
  18. n=(9/5);
  19. printf ("n=   %1.3f\n", n);
  20. }
  21. I have complied and run the programme & I got the answer n=1.000
  22. but Iam supposed to get answer 1.8.
  23. Why I got this answer?
  24. -- 
  25.